| Mustafa Usmani
In model-driven Power Apps, you can use the security roles feature to control access to different areas of the application. This includes the ability to show or hide specific sub-areas of the sitemap based on the user's security role.
To show or hide a sitemap sub-area based on table privileges, you will need to follow these steps:
- Navigate to the Security Roles area in your model-driven Power App. This can typically be found in the Settings section of the application.
- Select the security role that you want to modify.
- In the Access section, click the Edit button.
- In the Access Options window, select the Tables tab.
- From the list of tables, select the table that you want to use to control access to the sitemap sub-area.
- Under the Privileges section, select the privileges that you want to grant to this security role for the selected table.
- Click the Save button to apply your changes.
- Navigate to the Sitemap area in your model-driven Power App.
- Select the sub-area that you want to show or hide based on table privileges.
- In the Properties window, scroll down to the Security section.
- Under the Visible When section, select the "User's security role has privileges for" option.
- From the Table dropdown, select the table that you previously configured in the Security Roles area.
- From the Privileges dropdown, select the privileges that should be required for the sub-area to be visible.
- Click the Save button to apply your changes.
After completing these steps, the sitemap sub-area will only be visible to users with the specified privileges for the selected table. This can be a useful way to control access to different parts of your model-driven Power App and ensure that users only see the areas of the application that they have permission to access.
Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.